package io.itit.ecp.admin.provide.action.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.itit.grass.common.provide.action.validation.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：能源数据参数
 * @Date：Create by 2023-12-05 11:48:22
 */
@Data
@ToString
@ApiModel("能源数据参数")
public class EnergyDataReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotBlank(groups = IUpdate.class)
    @ApiModelProperty("主键")
    private String id;

    @ApiModelProperty("数据时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date solidifyDate;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH", timezone = "Asia/Shanghai")
    private Date solidifyDateStart;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH", timezone = "Asia/Shanghai")
    private Date solidifyDateEnd;

    @NotBlank
    @ApiModelProperty("能源类型Id")
    private String energyTypeId;

    @NotBlank
    @ApiModelProperty("项目Id")
    private String sceneProjectId;

    @ApiModelProperty("楼栋Id")
    private String sceneEdificeId;

    @ApiModelProperty("楼层Id")
    private String sceneFloorId;

    @ApiModelProperty("空间Id")
    private String sceneRoomId;

    @ApiModelProperty("公司Id")
    private String sceneCompanyId;

    //    @NotBlank(groups = {IUpdate.class, IAdd.class})
    @ApiModelProperty("计量设备Id")
    private String meterDeviceId;

    @ApiModelProperty("计量类型(1:电表,2:水表,3:冷表) >> ecp-admin.meterDevice.meterType")
    private String meterType;

    @ApiModelProperty("读表类型(11:光伏电表,12:储能电表,13:用电电表,21:用水水表,22:消防水表,31:用冷冷表) >> ecp-admin.meterDevice.readMeterType")
    private String readMeterType;

    @ApiModelProperty("读表标识(1:总表,2:分表) >> ecp-admin.meterDevice.readMeterTag")
    private String readMeterTag;

    @ApiModelProperty("用途")
    private String purpose;

    @ApiModelProperty("读取方式(1:自动,2:人工) >> distCode：ecp-admin.energyData.readType")
    private String readType;

    @ApiModelProperty("读数时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:00:00", timezone = "Asia/Shanghai")
    private Date readTime;

    @ApiModelProperty("读数值")
    private BigDecimal readValue;

    @NotNull
    @ApiModelProperty("计量数值")
    private BigDecimal meterValue;

    @NotNull
    @ApiModelProperty("碳排放(kgCO2)")
    private BigDecimal carbonEmission;

    @ApiModelProperty("碳排放(计算过程)")
    private String carbonEmissionProcess;

    @ApiModelProperty("标准煤")
    private BigDecimal standardCoal;

    /* 设备编号 */
    @ApiModelProperty("设备编号")
    private String deviceCode;

    /* 设备名称 */
    @ApiModelProperty("设备名称")
    private String deviceName;

    @NotBlank
    @ApiModelProperty("机构Id")
    private String deptId;

    /* 统计类型 */
    @ApiModelProperty("统计类型")
    private String staticsType;

    @ApiModelProperty("统计产品类型Id")
    private String productTypeId;

    /* 能源分类 */
    @ApiModelProperty("能源分类")
    private String energyCategory;

    /* 单位 */
    @ApiModelProperty("单位")
    private String energyTypeUnit;

    /*  测算范围 */
    @ApiModelProperty("测算范围")
    private String calculationRange;

}
